<div id="deactivate-log-list" class="row">
  <div class="col-9">
    <table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger" class="table table-hover table-striped">
      <thead>
      <tr>
        <th scope="col">Log ID</th>
        <th scope="col">Object ID</th>
        <th scope="col">Action</th>
        <th scope="col">User</th>
        <th scope="col">Version</th>
        <th scope="col">Date</th>
        <th scope="col">Links</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let deactiveLog of deActiveLogList">
        <th scope="row">{{deactiveLog.public_id}}</th>
        <td>{{deactiveLog.object_id}}</td>
        <td>{{deactiveLog.action_name}}</td>
        <td>{{deactiveLog.user_name}}</td>
        <td>{{deactiveLog.version}}</td>
        <td>{{deactiveLog.log_time.$date | date: "dd/MM/yyyy - HH:mm:ss"}}</td>
        <td>
          <a class="text-dark" routerLink="/framework/object/log/{{deactiveLog.public_id}}">
            <i class="fas fa-eye"></i>
          </a>
          <a class="text-dark ml-1"
             *permissionLink="['base.framework.log.delete']"
             (click)="deleteEmitter.emit(deactiveLog.public_id); rerender()">
            <i class="fas fa-trash-alt"></i>
          </a>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
  <div class="col-3">
    <div class="card">
      <div class="card-header">
        Log Methods:
      </div>
      <ul class="list-group list-group-flush" *permissionLink="['base.framework.log.delete']">
        <li class="list-group-item list-group-item-action list-group-item-danger pointer" (click)="cleanup()">
          <i class="far fa-trash-alt"></i> Cleanup
          <i class="fas fa-question-circle float-right" placement="left" ngbTooltip="Deletes all logs"></i>
        </li>
      </ul>
    </div>
  </div>
  <div class="col-12 mt-2 card-footer text-center text-muted">
    Logs with deleted objects
  </div>
</div>
